﻿#region
/* ===============================================
 * 作者：guopeng           时间：2012/5/12 16:14:56
 * 
 * 
 * 类描述：
 * 
 * 
 * =============================================== */
#endregion

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using ueEngine.Biz.Inf.Entities;
using ueEngine.Biz.Inf.LogicEntity.SupportData;
using ueEngine.Biz.Inf.Entities.DBSupport;

namespace ueEngine.Biz.Inf.LogicEntity
{
    public class RecruiterCollectModel : IAccessible<RecruiterCollect,RecruiterCollectModel>
    {
        #region self
        public int Id { get; set; }
        /// <summary>
        /// 求职者
        /// </summary>
        public string Seeker { get; set; }

        /// <summary>
        /// 代理人
        /// </summary>
        public string Agent { get; set; }

        /// <summary>
        /// 添加时间
        /// </summary>
        public DateTime AddDate { get; set; }

        /// <summary>
        /// 该代理的企业信息
        /// </summary>
        public CorporationModel CorporationModel { get; set; }
        #endregion

        protected override void Covariant(RecruiterCollect dbModel)
        {
            AddDate = dbModel.AddDate;
            Agent = dbModel.Agent;
            Id = dbModel.Id;
            Seeker = dbModel.Seeker;
        }
        protected override RecruiterCollect Inverter(RecruiterCollectModel model)
        {
            return new RecruiterCollect()
            {
                AddDate = model.AddDate,
                Agent = model.Agent,
                Id = model.Id,
                Seeker = model.Seeker
            };
        }
        //public override RecruiterCollectModel Element(System.Linq.Expressions.Expression<Func<RecruiterCollect, bool>> where)
        //{
        //    Covariant(new RecruiterCollect().Get(where));
        //    return this;
        //}
        //public override List<TResult> Elements<TResult>(System.Linq.Expressions.Expression<Func<RecruiterCollect, bool>> where, System.Linq.Expressions.Expression<Func<RecruiterCollect, TResult>> select)
        //{
        //    using (Context ctx = new Context())
        //    {
        //        return ctx.RecruiterCollect.Where(where).Select(select).ToList();
        //    }
        //}
    }
}
